{% extends "base.html" %}

{% block scripts %}
	{{ parent() }}
		<script type="text/javascript">
		var RecaptchaOptions = {
			theme : 'custom',
			custom_theme_widget: 'recaptcha_widget'
		};
	</script>
{% endblock %}

{% block title %}Reset Password{% endblock %}
{% block content %}
<div class="col-6">
	<form action="password.php?do=recover" method="POST" id="login-form">
		<legend>{{ lang.reset_reset_h1 }}</legend>
		<fieldset>
			{% if status %}
				{{ status|raw }}
			{% endif %}
			{% if get.error is defined %}
				<div class="alert alert-warning">Please ensure that you have cookies enabled. We were unable to verify the token sent.</div>
			{% endif %}
			{% if noshow == false %}
				<div class="form-group">
					<label for="email" class="control-label">{{ lang.string_email }}</label>
					<div>
						<input type="text" class="form-control" name="email" placeholder="{{ lang.string_email }}" />
					</div>
				</div>
				<div class="form-group">
					<label for="recaptcha_response_field" class="control-label">{{ lang.string_spam_protection }} <a href="javascript:Recaptcha.reload()">{{ lang.string_refresh }}</a></label>
					<div>
						<div class="col-4" style="padding-left: 0;">
							<input type="text" class="form-control" id="recaptcha_response_field" name="recaptcha_response_field"/>
						</div>
						<div class="col-8" style="margin-top:-10px;margin-bottom:20px;">
							<div id="recaptcha_image"></div>
						</div>
						<script type="text/javascript" src="http://www.google.com/recaptcha/api/challenge?k={{ settings.captcha_pub }}"></script>
						<noscript>
							<iframe src="http://www.google.com/recaptcha/api/noscript?k={{ settings.captcha_pub }}"
						height="300" width="500" frameborder="0"></iframe><br>
							<textarea name="recaptcha_challenge_field" rows="3" cols="40"></textarea>
							<input type="hidden" name="recaptcha_response_field" value="manual_challenge">
						</noscript>
					</div>
				</div>
				<div class="form-group">
					<div>
						{{ xsrf|raw }}
						<input type="submit" class="btn btn-primary" value="{{ lang.string_reset_password }}" />
						<button class="btn btn-default" onclick="window.location='index.php';return false;">{{ lang.string_login }}</button>
					</div>
				</div>
			{% endif %}
		</fieldset>
	</form>
</div>
<div class="col-3"></div>
{% endblock %}
